import React, { Component } from 'react';
import {Link,Route} from 'react-router-dom'
import Add from './views/Add';
import List from './views/List';

class App extends Component {
  render() {
    return (
      <div>
        <h2>todolist</h2>
        <hr />
        <Link to="/">列表</Link>
        <span> | </span>
        <Link to="/add">添加</Link>
        <hr />
        <Route path="/" exact={true} component={List}></Route>
        <Route path="/add" component={Add}></Route>
      </div>
    );
  }
}

export default App;
